.class Lcom/netease/newsreader/activity/AccountWebViewRegister$2;
.super Landroid/webkit/WebViewClient;
.source "AccountWebViewRegister.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/netease/newsreader/activity/AccountWebViewRegister;->setListener()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/netease/newsreader/activity/AccountWebViewRegister;


# direct methods
.method constructor <init>(Lcom/netease/newsreader/activity/AccountWebViewRegister;)V
    .locals 0
    .parameter

    .prologue
    .line 1
    iput-object p1, p0, Lcom/netease/newsreader/activity/AccountWebViewRegister$2;->this$0:Lcom/netease/newsreader/activity/AccountWebViewRegister;

    .line 59
    invoke-direct {p0}, Landroid/webkit/WebViewClient;-><init>()V

    return-void
.end method


# virtual methods
.method public onPageFinished(Landroid/webkit/WebView;Ljava/lang/String;)V
    .locals 5
    .parameter "view"
    .parameter "url"

    .prologue
    .line 65
    iget-object v3, p0, Lcom/netease/newsreader/activity/AccountWebViewRegister$2;->this$0:Lcom/netease/newsreader/activity/AccountWebViewRegister;

    invoke-static {v3}, Lcom/netease/newsreader/activity/AccountWebViewRegister;->access$1(Lcom/netease/newsreader/activity/AccountWebViewRegister;)Landroid/widget/LinearLayout;

    move-result-object v3

    const/16 v4, 0x8

    invoke-virtual {v3, v4}, Landroid/widget/LinearLayout;->setVisibility(I)V

    .line 66
    invoke-super {p0, p1, p2}, Landroid/webkit/WebViewClient;->onPageFinished(Landroid/webkit/WebView;Ljava/lang/String;)V

    .line 68
    if-eqz p2, :cond_0

    const-string v3, "username="

    invoke-virtual {p2, v3}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v3

    if-eqz v3, :cond_0

    .line 69
    const-string v3, "username"

    invoke-static {p2, v3}, Lcom/netease/newsreader/util/Tools;->parseURL(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    .line 70
    .local v2, username:Ljava/lang/String;
    const-string v3, ""

    invoke-virtual {v3, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-nez v3, :cond_0

    .line 71
    new-instance v1, Landroid/content/Intent;

    iget-object v3, p0, Lcom/netease/newsreader/activity/AccountWebViewRegister$2;->this$0:Lcom/netease/newsreader/activity/AccountWebViewRegister;

    const-class v4, Lcom/netease/newsreader/activity/AccountLogin;

    invoke-direct {v1, v3, v4}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 73
    .local v1, i:Landroid/content/Intent;
    new-instance v0, Landroid/os/Bundle;

    invoke-direct {v0}, Landroid/os/Bundle;-><init>()V

    .line 74
    .local v0, b:Landroid/os/Bundle;
    const-string v3, "username"

    invoke-virtual {v0, v3, v2}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 75
    const-string v3, "isRegister"

    const/4 v4, 0x1

    invoke-virtual {v0, v3, v4}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V

    .line 76
    invoke-virtual {v1, v0}, Landroid/content/Intent;->putExtras(Landroid/os/Bundle;)Landroid/content/Intent;

    .line 78
    iget-object v3, p0, Lcom/netease/newsreader/activity/AccountWebViewRegister$2;->this$0:Lcom/netease/newsreader/activity/AccountWebViewRegister;

    invoke-virtual {v3, v1}, Lcom/netease/newsreader/activity/AccountWebViewRegister;->startActivity(Landroid/content/Intent;)V

    .line 80
    iget-object v3, p0, Lcom/netease/newsreader/activity/AccountWebViewRegister$2;->this$0:Lcom/netease/newsreader/activity/AccountWebViewRegister;

    invoke-virtual {v3}, Lcom/netease/newsreader/activity/AccountWebViewRegister;->finish()V

    .line 81
    iget-object v3, p0, Lcom/netease/newsreader/activity/AccountWebViewRegister$2;->this$0:Lcom/netease/newsreader/activity/AccountWebViewRegister;

    invoke-static {v3}, Lcom/netease/newsreader/activity/AccountWebViewRegister;->access$0(Lcom/netease/newsreader/activity/AccountWebViewRegister;)Landroid/webkit/WebView;

    move-result-object v3

    invoke-virtual {v3}, Landroid/webkit/WebView;->getSettings()Landroid/webkit/WebSettings;

    move-result-object v3

    const/4 v4, 0x2

    invoke-virtual {v3, v4}, Landroid/webkit/WebSettings;->setCacheMode(I)V

    .line 86
    .end local v0           #b:Landroid/os/Bundle;
    .end local v1           #i:Landroid/content/Intent;
    .end local v2           #username:Ljava/lang/String;
    :cond_0
    return-void
.end method

.method public onReceivedSslError(Landroid/webkit/WebView;Landroid/webkit/SslErrorHandler;Landroid/net/http/SslError;)V
    .locals 1
    .parameter "view"
    .parameter "handler"
    .parameter "error"

    .prologue
    .line 93
    if-eqz p2, :cond_0

    .line 94
    :try_start_0
    invoke-virtual {p2}, Landroid/webkit/SslErrorHandler;->proceed()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 99
    :cond_0
    :goto_0
    return-void

    .line 95
    :catch_0
    move-exception v0

    .line 97
    .local v0, e:Ljava/lang/Exception;
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method

.method public shouldOverrideUrlLoading(Landroid/webkit/WebView;Ljava/lang/String;)Z
    .locals 1
    .parameter "view"
    .parameter "url"

    .prologue
    .line 103
    invoke-virtual {p1, p2}, Landroid/webkit/WebView;->loadUrl(Ljava/lang/String;)V

    .line 105
    const/4 v0, 0x1

    return v0
.end method
